﻿<!--
Project: ClipFlair (http://ClipFlair.codeplex.com)
Filename: ActivityContainer.xaml
Version: 20141111
-->

<UserControl x:Class="ClipFlair.Windows.ActivityContainer" 
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" 
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  xmlns:float="clr-namespace:SilverFlow.Controls;assembly=SilverFlow.Controls"
  xmlns:zui="clr-namespace:FloatingWindowZUI;assembly=FloatingWindowZUI"
  xmlns:clipflair="clr-namespace:ClipFlair.Windows"
  xmlns:widgets="clr-namespace:ClipFlair.UI.Widgets;assembly=ClipFlair.UI.Widgets"
  xmlns:utils="clr-namespace:System.Windows.Controls;assembly=Compatibility"
  xmlns:btn="clr-namespace:ImageButtons;assembly=ImageButtons"
             
  BorderThickness="0"
  d:DesignWidth="800" d:DesignHeight="600"
  >
  <!-- //EXAMPLE//
  xmlns:map="clr-namespace:ClipFlair.Windows;assembly=ClipFlair.Windows.Map"
  xmlns:mapview="clr-namespace:ClipFlair.Windows.Views;assembly=ClipFlair.Windows.Map"
  -->

  <UserControl.Resources>
    <ResourceDictionary>

      <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/SilverFlow.Controls;component/Themes/generic.xaml" />
        <!-- <ResourceDictionary Source="/FloatingWindowZUI;component/Themes/Generic.xaml" /> *** MUST NOT USE THIS, ELSE THE ADD BUTTONS DON'T SHOW UP *** -->
        <ResourceDictionary Source="/ClipFlair.Windows.Base;component/Themes/Generic.xaml" />
        <ResourceDictionary Source="/Clipflair.Windows.Activity;component/Images/Items.xaml" />
      </ResourceDictionary.MergedDictionaries>

    </ResourceDictionary>
  </UserControl.Resources>

  <Grid>
    <Grid.RowDefinitions>
      <RowDefinition Height="*"/>
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
      <ColumnDefinition Width="*"/>
    </Grid.ColumnDefinitions>

    <zui:FloatingWindowHostZUI 
      Name="zuiContainer" 
      Grid.Row="0" Grid.Column="0" 
      SnapinEnabled="True" 
      
      ShowOptionsButton="{Binding ContentPartsConfigurable, Mode=TwoWay}"
      IsIconbarVisible="{Binding IconbarVisible, Mode=TwoWay}"
      IsToolbarVisible="{Binding ToolbarVisible, Mode=TwoWay}"
      ContentScalable="{Binding ContentZoomable, Mode=TwoWay}"
      ContentScale="{Binding ContentZoom, Mode=TwoWay}"
      MinContentScale="0.3"
      MaxContentScale="3"
      >

      <zui:FloatingWindowHostZUI.ToolbarStyle>
        <Style TargetType="Border" BasedOn="{StaticResource ToolbarStyle}">
          <Setter Property="Height" Value="35" />
          <Setter Property="Background" Value="{StaticResource ClipFlairActivityToolbarBackground}" />
          <Setter Property="BorderThickness" Value="0" />
        </Style>
      </zui:FloatingWindowHostZUI.ToolbarStyle>

      <zui:FloatingWindowHostZUI.Bar>
        
        <StackPanel 
          Orientation="{Binding ToolbarOrientation}"
          HorizontalAlignment="Stretch"
          Background="{StaticResource ClipFlairActivityToolbarBackground}"  
          Margin="15,0,0,0"
          >
          
          <StackPanel.Resources>
            <Style TargetType="Button">
              <Setter Property="Margin" Value="0,8,5,8" />
              <Setter Property="Cursor" Value="Hand" />
            </Style>
          </StackPanel.Resources>

          <!-- Show Start Dialog -->
          
          <Button
            Name="btnProjectHome"
            VerticalAlignment="Center"
            ToolTipService.ToolTip="Show start dialog"
            Template="{StaticResource Home.xaml}"
            Click="btnProjectHome_Click"  
            />
          
          <!-- Load/Save -->
          
          <widgets:OptionsLoadSaveControl
            LoadURLTooltip="Load activity from URL"
            LoadTooltip="Load activity from file"
            SaveTooltip="Save activity to file"
            LoadURLClick="OptionsLoadSaveControl_LoadURLClick"
            LoadClick="OptionsLoadSaveControl_LoadClick"
            SaveClick="OptionsLoadSaveControl_SaveClick"
            Margin="10,3"
            Orientation="{Binding ToolbarOrientation}"
            />

          <!-- Add Components -->
          
          <StackPanel
            Name="panelAddComponents"
            Orientation="{Binding ToolbarOrientation}">

            <Button
              Name="btnAddClip"
              VerticalAlignment="Center"
              ToolTipService.ToolTip="Add Clip"
              Template="{StaticResource AddClip.xaml}"
              />

            <Button
              Name="btnAddCaptions"
              VerticalAlignment="Center"
              ToolTipService.ToolTip="Add Captions"
              Template="{StaticResource AddCaptions.xaml}"
              />

            <Button
              Name="btnAddRevoicing"
              VerticalAlignment="Center"
              ToolTipService.ToolTip="Add Revoicing"
              Template="{StaticResource AddRevoicing.xaml}"
              />

            <Button
              Name="btnAddText"
              VerticalAlignment="Center"
              ToolTipService.ToolTip="Add Text"
              Template="{StaticResource AddText.xaml}"
              />

            <Button
              Name="btnAddImage"
              VerticalAlignment="Center"
              ToolTipService.ToolTip="Add Image"
              Template="{StaticResource AddImage.xaml}"
              />

            <Button
              Name="btnAddMap"
              VerticalAlignment="Center"
              ToolTipService.ToolTip="Add Map"
              Template="{StaticResource AddMap.xaml}"
              />

            <Button
              Name="btnAddNews"
              VerticalAlignment="Center"
              ToolTipService.ToolTip="Add News"
              Template="{StaticResource AddNews.xaml}"
              />

            <btn:ImageButton
              Name="btnAddBrowser"
              VerticalAlignment="Center" Margin="0,0,5,0"
              ToolTipService.ToolTip="Add Web Browser"
              Image="/ClipFlair.Windows.Activity;component/Images/AddBrowser.png"
              ImageHover="/ClipFlair.Windows.Activity;component/Images/AddBrowser_hover.png"
              />
            
            <Button
              Name="btnAddGallery"
              VerticalAlignment="Center"              
              ToolTipService.ToolTip="Add Gallery"
              Template="{StaticResource AddGallery.xaml}"
              />

            <Button
              Name="btnAddNestedActivity"
              VerticalAlignment="Center"             
              ToolTipService.ToolTip="Add nested Activity"
              Template="{StaticResource AddActivity.xaml}"
              />

          </StackPanel>

        </StackPanel>

      </zui:FloatingWindowHostZUI.Bar>

      <zui:FloatingWindowHostZUI.Background>
        <SolidColorBrush Color="Transparent" />
      </zui:FloatingWindowHostZUI.Background>

      <!--<zui:FloatingWindowHostZUI.Windows>-->
      <!--<float:FloatingWindowCollection>-->

      <!-- //EXAMPLE// (some properties can be set on the FloatingWindow directly, but they're also exposed at the respective view object (it's preferred to set them there)
      <map:MapWindow Title="test" Width="100" >
        <map:MapWindow.View>
          <mapview:MapView Mode="Aerial" Height="100" />
        </map:MapWindow.View>
      </map:MapWindow>
      -->

      <!--</float:FloatingWindowCollection>-->
      <!--</zui:FloatingWindowHostZUI.Windows>-->

    </zui:FloatingWindowHostZUI>

  </Grid>

</UserControl>